package com.bing.entity;

import org.hibernate.validator.constraints.Length;

/**
 * Created by kaibb on 15-12-29.
 */
public class TestEntity {


    @Length(max = 10,min = 6,message = "Length.post.title")
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("TestEntity{");
        sb.append("name='").append(name).append('\'');
        sb.append(", age=").append(age);
        sb.append('}');
        return sb.toString();
    }
}
